package com.example.index.web.feign;


import com.example.index.web.User;
import com.netflix.ribbon.proxy.annotation.Hystrix;
import org.springframework.stereotype.Component;

@Component
public class UserActionHystrix implements IUserAction {
    @Override
    public String user() {
        return "降级";
    }

    @Override
    public String hello(String name) {
        return "你好"+name;
    }

    @Override
    public int add(int a, int b) {
        return a-b;
    }

    @Override
    public User reg(User user) {
        user.setName("降级"+user.getName());
        return user;
    }

    @Override
    public String ptest(String ptest) {
        return ptest+"降级";
    }
}
